<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>
		<ui:insert name="pagetitle">
			<h:outputText value="#{text.pageTitle}" />
		</ui:insert>
	</title>
	<h:outputStylesheet name="default.css" library="css" />
	<h:outputStylesheet name="style.css" library="css" />
	<ui:insert name="style"></ui:insert>
	<h:outputScript name="pt_BR.js" library="locales" />
	<h:outputScript>
		function baseUrl(url){if(url == null){url = "";}return "#{facesContext.externalContext.requestContextPath}" + url;}
	</h:outputScript>
	<h:outputScript name="jsUtils.js" library="js" />
	<ui:insert name="js"></ui:insert>
</h:head>
<h:body>
	<p:layout fullPage="true">
		<p:layoutUnit id="header" position="north"
			styleClass="ui-widget ui-widget-header">
			<ui:insert name="header">
				<h1><h:outputText value="#{text.title}" /></h1>
				<h2><h:outputText value="#{text.subtitle}" /></h2>
				<p:separator />
				<h:form id="frmHeader">
					<div class="welcome">
						<h:outputText value="#{text.welcome} "/>
						<h:outputText value="#{loginController.userData.name}"/>
					</div>
					<p:commandButton id="btnSair" onclick="dialogLogout.show()"
						value="#{text.btnLogout}" icon="ui-icon-transferthick-e-w"
						style="float:right;" global="false"/>
					<p:confirmDialog id="dlgConfirmLogout" widgetVar="dialogLogout"
						closable="true" severity="help" appendToBody="true"
						header="#{text.dlgConfirm}" message="#{message.confirmLogout}"
						width="400">
						<p:commandButton id="btnConfirmLogout" global="false"
							action="#{loginController.logout}" value="#{text.btnConfirm}"
							icon="ui-icon-check" />
						<p:commandButton id="btnDeclineLogout"
							onclick="dialogLogout.hide()" value="#{text.btnCancel}"
							icon="ui-icon-cancel" />
					</p:confirmDialog>
				</h:form>
			</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="west" size="150" header="#{text.titMainMenu}"
			collapsible="true">
			<h:form id="frmMenu">
				<p:accordionPanel styleClass="accordionMenu" activeIndex="#{paramValues.selectedMenu[0]}">
					<p:tab title="#{text.lblMenuCrud}" >
						<p:menu>
							<p:menuitem url="/pages/cargo/list.xhtml?selectedMenu=0" 
								value="#{text.titCargo}"/>
							<p:menuitem url="/pages/consignataria/list.xhtml?selectedMenu=0"
								value="#{text.titConsignataria}" />
							<p:menuitem url="/pages/uf/list.xhtml?selectedMenu=0" value="#{text.titUF}" />
							<p:menuitem url="/pages/orgao/list.xhtml?selectedMenu=0"
								value="#{text.titOrgao}" />
							<p:menuitem url="/pages/reparticao/list.xhtml?selectedMenu=0"
								value="#{text.titReparticao}" />
							<p:menuitem url="/pages/rubrica/list.xhtml?selectedMenu=0"
								value="#{text.titRubrica}" />
							<p:menuitem url="/pages/tipo_beneficio/list.xhtml?selectedMenu=0"
								value="#{text.titTipoBeneficio}" />
							<p:menuitem url="/pages/tipo_exclusao/list.xhtml?selectedMenu=0"
								value="#{text.titTipoExclusao}" />
							<p:menuitem url="/pages/usuario/list.xhtml?selectedMenu=0"
								value="#{text.titUsers}" />
						</p:menu>

					</p:tab>
					<p:tab title="#{text.titSocio}" >
						<p:menu>
							<p:menuitem url="/pages/socio/list.xhtml?selectedMenu=1"
								value="#{text.titSocioFichaCadastral}" />
							<p:menuitem url="/pages/dependente/list.xhtml?selectedMenu=1"
								value="#{text.titDependente}" />
							<p:menuitem url="/pages/beneficio/list.xhtml?selectedMenu=1"
								value="#{text.titBeneficio}" />
						</p:menu>
					</p:tab>
				</p:accordionPanel>
			</h:form>
		</p:layoutUnit>

		<p:layoutUnit id="center" position="center">
			<h:form id="frmContent" enctype="multipart/form-data">
				<h3>
					<ui:insert name="title">
						<h:outputText value="#{text.titHome}" />
					</ui:insert>
				</h3>
				<p:separator />
				<p:growl id="globalMessage" autoUpdate="true" showDetail="true"
					globalOnly="true" widgetVar="growlMessege" />

				<ui:insert name="content">


				</ui:insert>
				<p:ajaxStatus id="ajaxStatusDialog" oncomplete="loaderDialog.hide()"
					onerror="loaderDialog.hide()"
					onstart="loaderDialog.show()"  />
				<p:dialog id="dlgLoaderDialog" widgetVar="loaderDialog"
					header="#{text.dlgLoader}" appendToBody="true" modal="true"
					closable="false" resizable="false" draggable="false">
					<h:graphicImage library="images" name="loader.gif" />
				</p:dialog>
			</h:form>
			
		</p:layoutUnit>

		<p:layoutUnit id="footer" position="south" size="50"
			styleClass="ui-widget ui-widget-header ui-corner-all">
			<ui:insert name="footer">
				<h:outputText styleClass="copyright" value="#{text.copyright}" escape="false" />
			</ui:insert>
		</p:layoutUnit>

	</p:layout>
	
</h:body>
</html>